package com.pactera.jep.service.sys.dto;

import org.apache.commons.collections.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

public class MenuDto {
	
	private String id;
	
	private String name;
	
	private String parentId;
	
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	private Boolean hidden;
	
	private String path;
	
	List<MenuDto> children;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getHidden() {
		return hidden;
	}

	public void setHidden(Boolean hidden) {
		this.hidden = hidden;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public List<MenuDto> getChildren() {
		return children;
	}

	public void setChildren(List<MenuDto> children) {
		this.children = children;
	}
	
	public void addChildren(MenuDto menuDto) {
		if(CollectionUtils.isEmpty(children)) {
			this.children = new ArrayList<MenuDto>();
		}
		this.children.add(menuDto);
	}
}
